Skip to content

fix(nimbus): capture branch feature value changes in history changelog#14999

Merged
jaredlockhart merged 1 commit intomainfrom
2026-03-20-history-feature-values
Mar 23, 2026
Merged

fix(nimbus): capture branch feature value changes in history changelog#14999
jaredlockhart merged 1 commit intomainfrom
2026-03-20-history-feature-values

Conversation

@jaredlockhart
Copy link
Copy Markdown
Collaborator

Because

  • NimbusBranchesForm.save() called super().save() which triggered NimbusChangeLogFormMixin.save() to generate the changelog snapshot before self.branches.save() ran, causing the changelog to capture stale feature values instead of the updated ones
  • Feature value changes were invisible on the History page

This commit

  • Bypasses the mixin's save() in NimbusBranchesForm to call ModelForm.save() directly, then generates the changelog after all branch and feature value saves are complete
  • Adds a test that saves an experiment with initial feature values, updates the values, and asserts the changelog captures the change

Fixes #14998

Copy link
Copy Markdown
Contributor

@yashikakhurana yashikakhurana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done, thank you @jaredlockhart great find

@jaredlockhart jaredlockhart force-pushed the 2026-03-20-history-feature-values branch 2 times, most recently from de378fb to db087fc Compare March 20, 2026 21:16
Because

* NimbusBranchesForm.save() called super().save() which triggered
  NimbusChangeLogFormMixin.save() to generate the changelog snapshot
  before self.branches.save() ran, causing the changelog to capture
  stale feature values instead of the updated ones
* Feature value changes were invisible on the History page

This commit

* Moves self.branches.save() before super().save() in
  NimbusBranchesForm so that branch feature values are persisted
  before the changelog snapshot is taken
* Adds assertions to the existing test to verify the changelog
  captures the submitted feature values

Fixes #14998
@jaredlockhart jaredlockhart force-pushed the 2026-03-20-history-feature-values branch from db087fc to 57d195c Compare March 20, 2026 21:17
def save(self, *args, **kwargs):
experiment = super().save(*args, **kwargs)
self.branches.save()
experiment = super().save(*args, **kwargs)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's even more cleaner

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only the cleanest 🙏 🧹

@jaredlockhart jaredlockhart enabled auto-merge March 20, 2026 21:20
@jaredlockhart jaredlockhart added this pull request to the merge queue Mar 20, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 20, 2026
@jaredlockhart jaredlockhart added this pull request to the merge queue Mar 23, 2026
Merged via the queue into main with commit 67abaaa Mar 23, 2026
31 checks passed
@jaredlockhart jaredlockhart deleted the 2026-03-20-history-feature-values branch March 23, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

History page does not capture branch feature value changes

2 participants